<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="jxInclude.jsp"%>
<%@include file="jsInclude.jsp"%>
<%@include file="cssInclude.jsp"%>
<Style>
.treeBox {
  display: block;
  position: relative;
  width: 200px;  
  margin: 10px; 
  overflow: auto; 
  z-index: 0; 
  background-color: #fff;
  text-align:left; 
}
</Style>
<SCRIPT type="text/javascript">
var callURL = "<%=contextPath%>/indicate.do?";
//获取节点
function getChild(parentNode){
	parentNode.update(true);
	var parentCls = parentNode.getName().split(":")[1];
	getClsInfo(parentCls);
	var xhConn = new XHConn();
	xhConn.connect(callURL,"POST","call=getChildren&parentCls="+parentCls,
		function(xh1){
			var res1 = eval('('+xh1.responseText+')');
			if(res1){
				if("1" == res1.result){//成功
					var treeObjs = res1.msg;
					if(treeObjs == null || !treeObjs){
						return false;
					}
					for(var i = 0; i < treeObjs.length; i++){
						var treeObjItem = treeObjs[i];
						var _tiJf = new Jx.TreeFolder({
							label:treeObjItem[1]+":"+treeObjItem[0],
							onClick:function(){getChild(this)}
						});
						var isChildTree = parentNode.findChild(new Array(treeObjItem[1]+":"+treeObjItem[0]));
						if(isChildTree == null){
							parentNode.append(_tiJf);
						}
					}
				}else{
					var d2 = new Jx.Dialog({
						lable:'提示信息',
						modal:false,
						resize:false,
						move:false,
						content:'请求出现错误'+res.msg
					});
				}
			}else{
				var d1 = new Jx.Dialog({
					label:'提示信息',
					modal:true,
					resize:false,
					move:false,
					content:'请求失败!'
				});
				d1.open.bind(d1);
			}
		});
}
</SCRIPT>